package com.ruoyi.generateTest.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.generateTest.mapper.TestPaperMapper;
import com.ruoyi.generateTest.domain.TestPaper;
import com.ruoyi.generateTest.service.ITestPaperService;

/**
 * 试题Service业务层处理
 *
 * @author 经纬线
 * @date 2024-07-10
 */
@Service
public class TestPaperServiceImpl implements ITestPaperService
{
    @Autowired
    private TestPaperMapper testPaperMapper;

    /**
     * 查询试题
     *
     * @param testId 试题主键
     * @return 试题
     */
    @Override
    public TestPaper selectTestPaperByTestId(Long testId)
    {
        return testPaperMapper.selectTestPaperByTestId(testId);
    }

    /**
     * 查询试题列表
     *
     * @param testPaper 试题
     * @return 试题
     */
    @Override
    public List<TestPaper> selectTestPaperList(TestPaper testPaper)
    {
        return testPaperMapper.selectTestPaperList(testPaper);
    }

    /**
     * 新增试题
     *
     * @param testPaper 试题
     * @return 结果
     */
    @Override
    public int insertTestPaper(TestPaper testPaper)
    {
        return testPaperMapper.insertTestPaper(testPaper);
    }

    /**
     * 修改试题
     *
     * @param testPaper 试题
     * @return 结果
     */
    @Override
    public int updateTestPaper(TestPaper testPaper)
    {
        return testPaperMapper.updateTestPaper(testPaper);
    }

    /**
     * 批量删除试题
     *
     * @param testIds 需要删除的试题主键
     * @return 结果
     */
    @Override
    public int deleteTestPaperByTestIds(Long[] testIds)
    {
        return testPaperMapper.deleteTestPaperByTestIds(testIds);
    }

    /**
     * 删除试题信息
     *
     * @param testId 试题主键
     * @return 结果
     */
    @Override
    public int deleteTestPaperByTestId(Long testId)
    {
        return testPaperMapper.deleteTestPaperByTestId(testId);
    }
}
